package com.mm.cme.kotlin_001.level01.i_004_array

import com.mm.cme.kotlin_001.level01.i_002_package.beijing.Secretary
import com.mm.cme.kotlin_001.utils.p
import com.mm.cme.kotlin_001.utils.pl

/**
 * Descriptions：数组的使用
 * <p>
 * Author：ChenME
 * Date：2017/7/16
 * Email：ibelieve1210@163.com
 */
val array_int: IntArray = intArrayOf(1, 3, 5, 7, 9)
val array_char: CharArray = charArrayOf('H', 'e', 'l', 'l', 'o')
val array_string: Array<String> = arrayOf("今天", "是周末", "，我却在加班！")
val array_secretary: Array<Secretary> = arrayOf(Secretary("章"), Secretary("黄"))

fun main(args: Array<String>) {

    pl(array_int.size)

    for(char in array_char){
        p(char)
    }

    p("\n")
    pl(array_secretary[1])

    pl(array_char.joinToString(""))
    pl(array_string.slice(1..2))
}